package com.evil.application.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.evil.application.pojo.entity.ApplicationPermission;
import com.evil.common.application.dto.permission.app.AppPermissionSourceDTO;
import com.evil.common.application.dto.permission.app.AppPermissionsReqDTO;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;

/**
 * 应用权限表
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
public interface ApplicationPermissionMapper extends BaseMapper<ApplicationPermission> {

    List<ApplicationPermission> findBySource(AppPermissionSourceDTO source);

    List<ApplicationPermission> findBySources(@Param("sources") Collection<AppPermissionSourceDTO> sources);

    List<ApplicationPermission> findByAppPermissions(AppPermissionsReqDTO appPermissionsReqDTO);
}